<template>
  <div class="header-container"
       :style="{ color: color,
backgroundColor: bgcolor, fontSize: fsize + 'px' }">

    <van-nav-bar title="北京理工大学国防科技园2号楼10层"
                 left-text="返回"
                 left-arrow>
      <template #right>

        <van-icon name="search"
                  size="18" />
      </template>
    </van-nav-bar>

  </div>
</template>

<script>
export default {

  props: {
    title: { // 标题内容
      type: String,
      default: 'es-header'
    },
    bgcolor: { // 背景颜色
      type: String,
      default: '#007BFF'
    },
    color: { // 文字颜色
      type: String,
      default: '#ffffff'
    },
    fsize: { // 文字大小
      type: Number,
      default: 12
    }
  },

  name: 'appHeader',
  data () {
    return {
    }
  },
  methods: {},
  mounted () { }
}
</script>

<style scoped lang='less'>
.header-container {
  height: 45px;
  line-height: 45px;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}

.title {
  width: 250px;
  height: 22px;
  border: 1px solid red;
}
</style>
